package com.dji.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dji.pojo.Test;
import com.dji.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("test")
public class TestController {

    @Reference
    /*用于给TestService创建代理类*/
    TestService testService;
    @RequestMapping("finduser")
    public List<Test> findAllUser(){
       return testService.findAllUser();

    }
}
